package com.imooc.service.center;

import com.imooc.pojo.Orders;
import com.imooc.pojo.vo.OrderStatusCountsVO;
import com.imooc.pojo.vo.UserOrderVo;
import com.imooc.utils.PagedGridResult;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 逸尘风清
 * @date 2021/5/11
 * @time 14:16
 * 描述：
 */
public interface UserOrderService {

    PagedGridResult queryOrderList(String userId, Integer orderStatus, Integer page, Integer pageSize);

    @Transactional(propagation= Propagation.REQUIRED)
    void updateDeliverOrderStatus(String orderId);

    @Transactional(propagation=Propagation.SUPPORTS)
    Orders queryMyOrder(String userId, String orderId);

    @Transactional(propagation= Propagation.REQUIRED)
    boolean updateReceiveOrderStatus(String orderId);

    @Transactional(propagation=Propagation.REQUIRED)
    boolean deleteOrder(String userId, String orderId);

    @Transactional(propagation=Propagation.SUPPORTS)
    OrderStatusCountsVO getOrderStatusCounts(String userId);

    @Transactional(propagation=Propagation.SUPPORTS)
    PagedGridResult getOrdersTrend(String userId, Integer page, Integer pageSize);
}
